package forestOfTheGods;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Enumeration;

public class ServletDemo01 extends HttpServlet {

    @Override
    public void init(ServletConfig config) throws ServletException {
        Enumeration<String> names = config.getInitParameterNames();
        System.out.println(names);
        System.out.println(config.getInitParameter("嘉儿"));
        System.out.println(config.getInitParameter("素娜"));
        System.out.println(config.getInitParameter("美美"));
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
}
